package STUDENT.TRINHQUANGXUANDUC.OPPS.TINHNGAYTHANGNAM;

public class Models {
	/***
	 * Models tinh so ngay thang nam
	 * 
	 * @param object
	 * @return
	 */
	public int TinhNgay(DateObject object) {
		int kq = 0;
		if (object.getThang() == 4 || object.getThang() == 6 || object.getThang() == 9 || object.getThang() == 11) {
			kq = 30;
		}
		if (object.getThang() == 3 || object.getThang() == 5 || object.getThang() == 7 || object.getThang() == 12) {
			kq = 31;
		}
		if (object.getNam() % 4 == 0 && object.getNam() % 400 == 0 || object.getNam() % 100 != 0) {
			kq = 29;
		}
		return kq;
	}
}
